package com.chhuang.huaao.po;

import java.io.Serializable;
import java.util.Date;
import com.chhuang.core.model.AbstractPersistentModel;
import com.chhuang.core.validation.ValidGroupSave;
import com.chhuang.core.validation.ValidGroupUpdate;
import com.sun.xml.bind.CycleRecoverable;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import com.alibaba.fastjson.annotation.JSONField;

/**
* HaFeedback Model
* @author ChHuang
* @date Sun Apr 30 20:19:00 CST 2017
*/
public class HaFeedback extends AbstractPersistentModel implements CycleRecoverable{
	private static final long serialVersionUID = 4770414936471556248L;
	@NotNull(message="{HaFeedback.feedbackId.NotNull}",groups={ValidGroupUpdate.class})
	@Size(max=32,message="{HaFeedback.feedbackId.Size}",groups={ValidGroupSave.class})
	private String feedbackId;
	public String getFeedbackId(){
		return feedbackId;
	}
	public void setFeedbackId(String feedbackId){
		this.feedbackId=feedbackId;
	}
	@Size(max=65535,message="{HaFeedback.feedbackContent.Size}",groups={ValidGroupSave.class})
	private String feedbackContent;
	public String getFeedbackContent(){
		return feedbackContent;
	}
	public void setFeedbackContent(String feedbackContent){
		this.feedbackContent=feedbackContent;
	}
	@NotNull(message="{HaFeedback.customerId.NotNull}",groups={ValidGroupUpdate.class,ValidGroupSave.class})
	@Size(max=32,message="{HaFeedback.customerId.Size}",groups={ValidGroupSave.class})
	private String customerId;
	public String getCustomerId(){
		return customerId;
	}
	public void setCustomerId(String customerId){
		this.customerId=customerId;
	}
	@Size(max=255,message="{HaFeedback.customerAccount.Size}",groups={ValidGroupSave.class})
	private String customerAccount;
	public String getCustomerAccount(){
		return customerAccount;
	}
	public void setCustomerAccount(String customerAccount){
		this.customerAccount=customerAccount;
	}
	@Size(max=255,message="{HaFeedback.customerName.Size}",groups={ValidGroupSave.class})
	private String customerName;
	public String getCustomerName(){
		return customerName;
	}
	public void setCustomerName(String customerName){
		this.customerName=customerName;
	}
	@Size(max=255,message="{HaFeedback.deviceModel.Size}",groups={ValidGroupSave.class})
	private String deviceModel;
	public String getDeviceModel(){
		return deviceModel;
	}
	public void setDeviceModel(String deviceModel){
		this.deviceModel=deviceModel;
	}
	@Size(max=255,message="{HaFeedback.deviceVendor.Size}",groups={ValidGroupSave.class})
	private String deviceVendor;
	public String getDeviceVendor(){
		return deviceVendor;
	}
	public void setDeviceVendor(String deviceVendor){
		this.deviceVendor=deviceVendor;
	}
	@Size(max=255,message="{HaFeedback.deviceSystem.Size}",groups={ValidGroupSave.class})
	private String deviceSystem;
	public String getDeviceSystem(){
		return deviceSystem;
	}
	public void setDeviceSystem(String deviceSystem){
		this.deviceSystem=deviceSystem;
	}
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	private Date createTime;
	public Date getCreateTime(){
		return createTime;
	}
	public void setCreateTime(Date createTime){
		this.createTime=createTime;
	}
	@Override
	public Serializable getId() {
		return getFeedbackId();
	}
	@Override
	public void setId(Serializable id) {
		setFeedbackId((String)id);
	}
	@Override
	public Object onCycleDetected(Context arg0) {
		HaFeedback temp=new HaFeedback();
		temp.setFeedbackId(feedbackId);
		return temp;
	}
	@Override
	public String toString() {
		return "HaFeedback [feedbackId="+feedbackId+",feedbackContent="+feedbackContent+",customerId="+customerId+",customerAccount="+customerAccount+",customerName="+customerName+",deviceModel="+deviceModel+",deviceVendor="+deviceVendor+",deviceSystem="+deviceSystem+",createTime="+createTime+"]";
	}
}